<?php

namespace front\models;

use Yii;

/**
 * This is the model class for table "collection".
 *
 * @property string $ID
 * @property string $C_Id
 * @property string $S_Id
 * @property string $P_Id
 * @property string $p_name
 * @property string $pic
 * @property string $created_at
 * @property string $updated_at
 */
class CollectionModel extends \common\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'collection';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('db');
    }
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['C_Id', 'S_Id', 'P_Id', 'p_name', 'pic', 'created_at'], 'required'],
            [['C_Id', 'S_Id', 'P_Id', 'created_at', 'updated_at'], 'integer'],
            [['p_name', 'pic'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'ID' => 'ID',
            'C_Id' => 'C  ID',
            'S_Id' => 'S  ID',
            'P_Id' => 'P  ID',
            'p_name' => 'P Name',
            'pic' => 'Pic',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
        ];
    }
}
